package com.xy.work.template.common.enums;

import com.xy.work.template.common.interfaces.BaseCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author niuniu
 * @Date: 2021/8/14 18:26
 * @Description: APi模块接口定义
 */
@AllArgsConstructor
@Getter
public enum CommonCodeEnum implements BaseCodeEnum {

    /**
     * 通用操作码
     */
    OPS_REPEAT(110001,"重复操作"),
    CACHE_LOCK_PREFIX(110002,"锁前缀不能为空"),
    JWT_ERROR(110004,"jwt参数配置错误"),
    /**
     * 系统操作码
     */
    SYSTEM_ERROR(505001,"系统内部错误"),
    SYSTEM_NOT_404(505002,"程序迷路了，请返回首页"),
    SYSTEM_PARAMETERS_ERROR(505003,"系统参数错误"),
    SYSTEM_INSIDE_COMMUNICATION_ERROR(505004,"内部通信错误"),
    /**
     *验证码
     */
    CODE_TO_ERROR(240001,"接收号码不合规"),
    CODE_LIMITED(240002,"验证码发送过快"),
    CODE_ERROR(240003,"验证码错误"),
    CODE_CAPTCHA(240004,"图形验证码错误"),
    /**
     * 发送短信相关的
     */
    SMS_ENUM_NOT_EXIST(240005,"当前短信发送方式站暂不支持"),
    SMS_ENUM_CONFIG_ACCESS_KEY_ID(240006,"短信配置错误"),
    SMS_ENUM_CONFIG_ACCESS_KEY_SECRET(240007,"短信配置错误"),
    SMS_SEND_FAIL(240008,"发送短信失败"),
    SMS_TEMPLATE_PARAM(240009,"请填写短信模板参数"),
    SMS_TEMPLATE_CODE(240010,"请填写短信模板Code"),
    SMS_TEMPLATE_SIGN_NAME(240011,"请填写短信签名，名称"),
    /**
     * 阿里云oss相关的
     */
    UPLOAD_FILE_NOT_EXIST(240100,"上传文件不存在"),
    UPLOAD_FILE_EXTENSION_NOT_EXIST(240101,"上传文件后缀名不存在"),
    UPLOAD_FILE_FORMAT_ERROR(240102,"上传文件格式错误"),
    OSS_ENDPOINT_ERROR(240102,"阿里云 oos 《ENDPOINT》上传配置错误"),
    OSS_ACCESS_KEY_ID_ERROR(240103,"阿里云 oos 《ACCESS_KEY_ID》上传配置错误"),
    OSS_ACCESS_KEY_SECRET_ERROR(240104,"阿里云 oos 《ACCESS_KEY_SECRET》 上传配置错误"),
    /**
     * 账号
     */
    ACCOUNT_REPEAT(250001,"账号已经存在"),
    ACCOUNT_UNREGISTER(250002,"账号不存在"),
    ACCOUNT_PWD_ERROR(250003,"账号或者密码错误"),
    ACCOUNT_REGISTER_PWD_ERROR(250004,"请输入账号密码信息"),
    MAIL_ERROR(250005,"邮箱格式错误"),
    PHONE_ERROR(250006,"手机号格式错误"),
    PHONE_MAIL_ERROR(250007,"手机号/邮箱格式错误"),
    LOGIN_EXPIRE(250008,"登陆已过期，请重新登陆")
    ;
    /**
     * 消息code嘛
     *
     */
    private final int code;
    /**
     * 提示消息
     */
    private final String message;
}
